< previous page page_467 next page >

Page 467
Debug.Print "THE VB MOUSE MOVE EVENT HAS FIRED!"
Run the sample program again, and notice that the Immediate window lists the output from the preceding Print statement, as well as the one in WindowProc. However, by modifying WindowProc, you can turn off the VB MouseMove event:
Function WindowProc(ByVal hw As Long, ByVal uMsg As Long, ByVal wParam As Long, _
          ByVal lParam As Long) As Long
    Debug.Print "Message: "; hw, uMsg, wParam, lParam
    If uMsg <> 512 Then WindowProc = CallWindowProc(lpPrevWndProc, hw, uMsg, _
       wParam, lParam)

    '(Decimal 512 is 200 hex which is WM_MOUSEMOVE in the API text file.)
End Function
From Here . . .
This chapter is by no means a complete API reference; rather, its intention is to introduce you to some of the issues involved when using the Windows API. Keep in mind that the Windows APIs are not the only APIs around. You can purchase third-party DLLs that perform a variety of functions, such as ZIP file creation or custom reporting. In this case, the documentation and Declare statements would be included with the product.
The Windows API documentation for Visual Basic is severely lacking. To use the Windows API effectively, you will almost certainly have to find another source. The standard API reference for Visual Basic programmers is Daniel Appleman's Visual Basic Programmer's Guide to the Win32 API, which has thorough and in-depth coverage. Another source is the Microsoft Developer Network Online, available at http://www.microsoft.com/msdn/.
For more detail on the informatin found in this chapter, refer to the following chapters:
To learn about some graphics-related API calls, see the section "Other Graphics Methods" in Chapter 19, "Using Visual Design Elements."
To use API calls to access INI files, see Chapter 21, "Working with Files."
To see how API calls can be used to alter how bitmaps are painted on the screen, see Chapter 23, "Master's Toolbox."

 
< previous page page_467 next page >